package com.asuka.controller.admin;

import com.asuka.result.Result;
import com.asuka.service.WorkspaceService;
import com.asuka.vo.BusinessVO;
import com.asuka.vo.OverviewOrdersVO;
import com.asuka.vo.OverviewVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/admin/workspace")
@RestController
@Slf4j
public class WorkspaceController {


    @Autowired
    private WorkspaceService workspaceService;


    @GetMapping("/businessData")
    public Result<BusinessVO> businessData(){

        BusinessVO bvo = workspaceService.businessData();

        return Result.success(bvo);
    }


    @GetMapping("/overviewSetmeals")
    public Result<OverviewVO> overviewSetmeals(){

        OverviewVO osvo = workspaceService.overviewSetmeals();

        return Result.success(osvo);
    }


    @GetMapping("/overviewDishes")
    public Result<OverviewVO> overviewDishes(){

        OverviewVO osvo = workspaceService.overviewDishes();

        return Result.success(osvo);
    }


    @GetMapping("/overviewOrders")
    public Result<OverviewOrdersVO> overviewOrders(){

        OverviewOrdersVO oovo = workspaceService.overviewOrders();

        return Result.success(oovo);
    }



}
